<!DOCTYPE html>
<html>

	<head>
		<meta charset="UTF-8">
		<title>项目管理系统</title>
		<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
		<meta name="renderer" content="webkit">
		<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
		<meta name="format-detection" content="telephone=no">
		<link rel="stylesheet" href="../../css/oksub.css" media="all" />
		<style type="text/css">
			.layui-col-md1 .ok-card-body {
				padding: 7px;
				font-size: 15px;
				cursor: pointer;
			}
			
			.buttonbody .layui-btn {
				width: 100%;
			}
		</style>
	</head>

	<body class="ok-body-scroll console">
		<div class="ok-body home">
			<div class="layui-row layui-col-space15">
				<div class="layui-col-md2">
					<div class="layui-form" lay-filter="myDiv">
						<select lay-filter="mySelect" id="select" lay-search>
						</select>
					</div>
				</div>
				<div class="layui-col-md1">
					<div class="layui-card buttonbody">
						<div class="layui-btn layui-btn-normal" id="all">
							<div class="cart-r">
								<div class="stat-heading">全部需求</div>
							</div>
						</div>
					</div>
				</div>
				<div class="layui-col-md1">
					<div class="layui-card buttonbody">
						<div class="layui-btn layui-btn-normal" id="state1">
							<div class="cart-r">
								<div class="stat-heading">已激活</div>
							</div>
						</div>
					</div>
				</div>
				<div class="layui-col-md1">
					<div class="layui-card buttonbody">
						<div class="layui-btn layui-btn-normal" id="state6">
							<div class="cart-r">
								<div class="stat-heading">已审批</div>
							</div>
						</div>
					</div>
				</div>
				<div class="layui-col-md1">
					<div class="layui-card buttonbody">
						<div class="layui-btn layui-btn-primary" id="state4">
							<div class="cart-r">
								<div class="stat-heading">待关闭</div>
							</div>
						</div>
					</div>
				</div>
				<div class="layui-col-md1">
					<div class="layui-card buttonbody">
						<div class="layui-btn layui-btn-normal" id="state5">
							<div class="cart-r">
								<div class="stat-heading">已关闭</div>
							</div>
						</div>
					</div>
				</div>
				<div class="layui-col-md1">
					<div class="layui-card buttonbody">
						<div class="layui-btn layui-btn-normal" id="pointer">
							<div class="cart-r">
								<div class="stat-heading">指派给我</div>
							</div>
						</div>
					</div>
				</div>

				<div class="layui-col-md1">
					<div class="layui-card buttonbody">
						<div class="layui-btn layui-btn-primary" id="creater">
							<div class="cart-r">
								<div class="stat-heading">由我创建</div>
							</div>
						</div>
					</div>
				</div>
				<div class="layui-col-md1">
					<div class="layui-card buttonbody">
						<div class="layui-btn layui-btn-primary" id="approver">
							<div class="cart-r">
								<div class="stat-heading">由我评审</div>
							</div>
						</div>
					</div>
				</div>

				<div class="layui-col-md1">
					<div class="layui-card buttonbody">
						<div class="layui-btn layui-btn-primary" id="closer">
							<div class="cart-r">
								<div class="stat-heading">由我关闭</div>
							</div>
						</div>
					</div>
				</div>
			</div>
			<div class="layui-row layui-col-space15">
				<div class="layui-card">
					<div class="ok-card-body ">
						<table id="table" lay-filter="table"></table>
					</div>
				</div>
			</div>
		</div>
	</body>

</html>
<script type="text/html" id="barDemo">
	<div class="layui-btn-group">
		<button class="layui-btn layui-btn-xs" lay-event="approve"><i class="layui-icon" title="评审">&#xe615;</i></button>
		<button class="layui-btn layui-btn-xs" lay-event="close"><i class="layui-icon" title="关闭">&#x1006;</i></button>
		<button class="layui-btn layui-btn-xs" lay-event="editor"><i class="layui-icon" title="编辑">&#xe642;</i></button>
	</div>
</script>
<script type="text/javascript" src="../../lib/layui/layui.js"></script>
<script type="text/javascript" src="../../js/jquery.min.js"></script>
<script type="text/javascript" src="../../js/service.js"></script>
<script>
	$(function() {
		layui.use(["form"], function() {
			getdata("/product/searchByPage", {}, "GET", function(data) {
				console.log(data);
				data = data.data;
				$.each(data, function(index, item) {
					$("#select").append(new Option(item.name, item.id));
				});
				$("#select").val("1");
				layui.form.render('select', 'myDiv');
			})
		})
	});
</script>
<script type="text/javascript" src="product_demand.js"></script>